<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Jasmine Spec Runner: Jasmine Core</title>
    
    <link href="Resources/Css/jasmine.css" rel="stylesheet"/>

    <script src="Resources/Scripts/jquery-2.1.1.min.js"></script>
    <script src="Resources/Scripts/bootstrap.min.js"></script>
    <script src="Resources/Scripts/angular.min.js"></script>
    <script src="Resources/Scripts/angular-resource.min.js"></script>
    <script src="Resources/Scripts/angular-route.min.js"></script>
    <script src="Resources/Scripts/angular-gettext.min.js"></script>
    <script src="Resources/Scripts/translations.js"></script>

    <script type="text/javascript" src="Resources/Scripts/jasmine.js"></script>
    <script type="text/javascript" src="Resources/Scripts/jasmine-html.js"></script>
    <script type="text/javascript" src="Resources/Scripts/jasmine-jsreporter.js"></script>
    <script type="text/javascript" src="Resources/Scripts/jasmine2-junit.js"></script>

    <script type="text/javascript" src="Resources/Scripts/angular-mocks.js"></script>
    
    <script type="text/javascript" src="/../../GUI/ViewModels/index.viewmodel.js"></script>
    <script type="text/javascript" src="modules/index.viewmodel.spec.js"></script>

    <script type="text/javascript">
        (function () {
            try {

                console.info('Load jasmine environment');
                var jasmineEnv = jasmine.getEnv();
                jasmineEnv.updateInterval = 1000;

                console.info('Load html jasmine reporter');
                var htmlReporter = new jasmine.TrivialReporter();
                jasmineEnv.addReporter(htmlReporter);

                console.info('Load json jasmine reporter');
                var jsonReporter = new jasmine.JSReporter();
                jasmineEnv.addReporter(jsonReporter);

                jasmineEnv.specFilter = function (spec) {
                    console.info('Execute spec filter');
                    return htmlReporter.specFilter(spec);
                };

                window.onload = function () {
                    console.info('Window loaded');
                    execJasmine();
                };

                jsonReporter.reportSuiteResults = function (suite) {
                    try {
                        suite.children_.forEach(function (child) {
                            console.info(child);
                        });
                    }
                    catch (err)
                    {
                        alert(err);
                    }
                }

                function execJasmine() {
                    console.info('Execute jasmine');
                    jasmineEnv.execute(); 
                }
				
            } catch (err) {
                console.error(err);
            }

        })();
    </script>
</head>
<body>

</body>
</html>
